package com.mio.hdfs.sort;

import java.io.IOException;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

public class SortMap extends Mapper<LongWritable, Text, SortBean, NullWritable> {

	SortBean bean = new SortBean();
	@Override
	protected void map(LongWritable key, Text value,Context context)
			throws IOException, InterruptedException {
		  Integer num = Integer.parseInt(value.toString());
		  bean.setIndex(0);
		  bean.setNum(num);
		  context.write(bean, NullWritable.get());
	}

}
